package creation_patterns.builder_pattern.concrete_builder;

import creation_patterns.builder_pattern.abstract_builder.Builder;
import creation_patterns.builder_pattern.director.Director;
import creation_patterns.builder_pattern.product.computer.Computer;
import creation_patterns.builder_pattern.product.computer.intel.IntelCPU;
import creation_patterns.builder_pattern.product.computer.intel.IntelDisPlayer;
import creation_patterns.builder_pattern.product.computer.intel.IntelMainBoard;

public class IntelBuilder extends Builder {
    public IntelBuilder() {
    }

    public IntelBuilder(Computer computer) {
        this.computer = computer;
    }

    private Computer computer = new Computer();
    @Override
    public Builder buildCPU() {
        this.computer.setCpu(new IntelCPU());
        return this;
    }

    @Override
    public Builder buildMainBoard() {
        this.computer.setMainBoard(new IntelMainBoard());
        return this;
    }

    @Override
    public Builder buildDisplay() {
        this.computer.setDisPlayer(new IntelDisPlayer());
        return this;
    }

    @Override
    public Computer builder() {
        return computer;
    }
}
